<!--
 * @Author: weidewei
 * @Date: 2025-05-13 17:58:42
 * @LastEditors: weidewei
 * @LastEditTime: 2025-05-13 18:27:33
 * @Description: 
 * @FilePath: \2025-front-face\vue\vue2\v2\src\components\TestRefComp.vue
-->
<template>
  <div>
    <button @click="getParentInstance">点击获取父组件的实例</button>
    <h3>组件实例: {{ parentVm }}</h3>
  </div>
</template>
<script>
export default {
  data() {
    return {
        
    };
  },
  props: {
    parentVm: {
        type: Object,
        default: () => ({})
    }
  },
  methods: {
    getParentInstance() {
        // console.log("$parentt",this.$parent)
        return this.$parent
    },
  },
};
</script>
